package com.cqvie.model;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

@Entity
public class Classes {
	private String classID; // 班级ID
	private String className; // 班级名称
	private int stuNumber; // 班级人数
	private Teacher masterTeacher;// 班主任

	@Id
	public String getClassID() {
		return classID;
	}

	public String getClassName() {
		return className;
	}

	@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
	@JoinColumn(name = "teacherMaster")
	public Teacher getMasterTeacher() {
		return masterTeacher;
	}

	public int getStuNumber() {
		return stuNumber;
	}

	public void setClassID(String classID) {
		this.classID = classID;
	}

	public void setClassName(String className) {
		this.className = className;
	}

	public void setMasterTeacher(Teacher masterTeacher) {
		this.masterTeacher = masterTeacher;
	}

	public void setStuNumber(int stuNumber) {
		this.stuNumber = stuNumber;
	}

}
